package com.example.demo.uservice;

import com.example.demo.uservice.impl.UserFeignClinetFallback;
import com.springcloud.demo.model.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

//fallback异常调用此类
@FeignClient(name = "dm-user-provider",fallback = UserFeignClinetFallback.class)
public interface UserFeignClient {

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public String login(@RequestParam("count")int count);

//    public boolean login(@RequestBody User user);

//    public boolean login(@RequestParam("name")String name, @RequestParam("pwd")String pwd);
}
